home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
os2
/
splot170.zip
/
demo
/
3DDRAW.SPT
< prev
next >
Wrap
Text File
|
1996-10-10
|
5KB
|
204 lines
#include <splot.h>
double* data;
int i;
int colour_fill(int colour)
{
gsave();
set(LINECOLOUR,colour);
fill();
grestore();
};
main()
{
set(FONTWIDTH,0.3);
text(0.5,25.5,CURFILENAME);
set(FONTWIDTH,0.5);
set(AXESCLIP,ON);
set(PAGEROT,OFF);
scale(.9,.9);
// perspective guide
set(LINEWIDTH,0.001);
set(LINECOLOUR,CYAN);
for(i=-10;i<30;i++)
{
moveto(-30,25);
lineto(25,i);
stroke();
moveto(50,30);
lineto(0,i);
stroke();
}
moveto(-30,25);
lineto(18,6.5);
stroke();
set(LINECOLOUR,BLACK);
set(LINEWIDTH,0.05);
moveto( 10.95,2.67);
lineto( 5.137,5.820 , 5.137,9.03, 10.95,
6.39);
closepath();
colour_fill(GREEN);
stroke();
moveto( 5.137,9.03);
lineto( 10.751,11.659, 16.52,9.78, 10.95,6.39);
colour_fill(WHITE);
closepath();
stroke();
moveto( 10.95,6.39);
lineto( 10.95,2.69, 16.52,6.51, 16.52,9.78);
colour_fill(WHITE);
closepath();
moveto( 15.948,6.883);
lineto( 14.798,6.118, 14.798,8.152, 15.948,8.861);
closepath();
colour_fill(WHITE);
stroke();
moveto( 9.61,8.42);
lineto( 12.85,10.19, 13.32,11.20, 13.326,18.285, 8.76,16.81, 8.76,10.07);
closepath();
colour_fill(WHITE);
stroke();
moveto( 9.61,8.42);
lineto( 7.042,9.527, 6.492,10.954, 8.76,10.072);
closepath();
colour_fill(BLACK);
stroke();
moveto( 8.76,10.072);
lineto( 8.76,16.819, 6.492,17.312, 6.492,10.954);
closepath();
colour_fill(GREEN);
stroke();
moveto( 6.491,17.316);
lineto( 10.978,18.66 , 13.314,18.285, 8.76,16.823);
closepath();
colour_fill(WHITE);
stroke();
moveto( 8.677,17.962);
lineto( 11.030,17.554, 11.03,12.854, 8.737,11.855, 6.491,12.648);
stroke();
//input port
moveto( 15.362+.189,8.255-0.052);
rsplineto( -0.189,0.052,-0.177,-0.069, -0.148,-0.155, -0.16,-0.286, -0.041,-0.29, 0.070,-0.310, 0.130,-0.208);
lineto( 17.134,6.105, 17.368,7.531);
closepath();
colour_fill(GREEN);
stroke();
moveto( 17.283+.189,7.526-.052);
rsplineto(- 0.189,0.052,-0.177,-0.069, -0.148,-0.155, -0.16,-0.286, -0.041,-0.29, 0.070,-0.310, 0.130,-0.208, 0.313,-0.118, 0.280,0.114, 0.198,0.274, 0.049,0.294, -0.020,0.331, -0.148,0.257, -0.161,0.114); closepath();
colour_fill(WHITE);
stroke();
// LN2 tank
// contour
moveto( 11.803,18.179);
lineto( 11.803,19.058, 13.444,19.671, 13.775,19.874, 13.799,19.929, 13.815,24.721, 12.294,25.168, 10.310,25.160, 8.804,24.713, 8.797,19.929, 8.837,19.866, 9.070,19.690, 10.802,19.058, 10.794,18.179);
splineto( 10.8249,18.1363, 10.8727,18.1029, 10.9402,18.0779, 11.0048,18.0639, 11.0694,18.05 ,11.1594,18.0389, 11.2296,18.0333, 11.3785,18.0361, 11.4629,18.0417, 11.5415,18.0528, 11.6118,18.0667, 11.6792,18.0862, 11.7242,18.1029,
11.7607,18.128 ,11.786,18.1558);
closepath();
colour_fill(CYAN);
stroke();
gsave();
scale(1,.25);
arc( 11.306,76.22,.5,180,360);
stroke();
grestore();
gsave();
scale(1,.2);
arc( 11.306,99.65,2.5,180,360);
stroke();
grestore();
gsave();
scale(1,.05);
arc( 11.306,494.30,2.5,180,360);
stroke();
arc( 11.306,503.22,1,0,360);
colour_fill(WHITE);
stroke();
grestore();
// scan tube
gsave();
scale(1,0.3);
arc( 8.859,58.140,1.2,180,0);
closepath();
colour_fill(BLACK);
grestore();
moveto( 7.668,17.46);
lineto( 7.668,25.02, 10.050,25.124, 10.050,17.459);
closepath();
colour_fill(BLACK);
stroke();
// motor box
moveto( 7.085,25.022);
lineto( 9.218,25.022, 9.218,26.711, 7.085,26.64);
closepath();
colour_fill(GREEN);
stroke();
moveto( 9.218,25.022);
lineto( 10.245,25.116, 10.245,26.753, 9.218,26.72);
closepath();
stroke();
// motor circles
gsave();
scale(.8,1);
arc( 12.346,25.905,1,90,270);
lineto( 12.734,24.885, 12.752,26.921);
closepath();
colour_fill(GREEN);
stroke();
arc( 12.762,25.905,1,0,360);
closepath();
colour_fill(WHITE);
stroke();
grestore();
// labels
text( 14.62,23.62,"external liquid");
text("nitrogen reservoir");
text( 3.62,26 ,"scan motor");
text( 16.25,5.5 ,"input port");
text( 3.5,18.5 ,"scanning mirror");
text("assembly");
text( 14.37,16.75,"interferometer");
text("box");
text( 14.62,12 ,"collimator");
text(" box");
moveto( 15.25,11.37);
lineto( 14.62,10.12);
moveto( 14.25,15.75);
lineto( 12.75,15.25);
moveto( 14.37,23.12);
lineto( 13.37,23 );
moveto( 6.5,25.87);
lineto( 7.5,25.87);
moveto( 5.62,19 );
lineto( 7.37,20.12);
moveto( 4.5,17 );
lineto( 6.25,15.25);
stroke();
}